import request from '@/config/axios'
// 获得工单列表
export const getWorkorder = async (params) => {
  return await request.get({ url: '/order/workorder', params })
}
// 提交工单
export const addWorkorder = async (data) => {
  return await request.post({ url: '/order/workorder', data })
}
// 查看工单详情
export const detilWorkorder = async (id) => {
  return await request.get({ url: `/order/workorder/${id}` })
}
// 修改工单
export const editWorkorder = async (data) => {
  return await request.put({ url: `/order/workorder/${data.id}`, data })
}
// 删除工单
export const delWorkorder = async (id) => {
  return await request.delete({ url: `/order/workorder/${id}` })
}
// 获取顶部数据
export const getNum = async (id) => {
  return await request.get({ url: `/order/workorder/summary` })
}
